473,474 Members | 1,852 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Combo box; Add New; Save; Delete Buttons

16 New Member
Hi there, I have created a windows form application where I've placed a combo box; a load button and three data-grids. All these receive their data from a SQL Database. The combo box from table1. The three data grids from table 2, 3, and 4. Now when I click the load button data in the database is displayed in the respective controls. What I need now , is the code for the Add New button to clear the controls ; the delete button, to delete the record with the focus on it ; the save button to save the newly added record to the database. Please Help... :-(
Sep 16 '09 #1
2 3580
MrMancunian
569 Recognized Expert Contributor
What did you try yourself so far?

Steven
Sep 16 '09 #2
Kappucino XL
16 New Member
@MrMancunian
Well, since my load button(whichworkks) code is :
this.table1TableAdapter.Fill(this.tableDataSet.Cat egorytable);
this.table2TableAdapter.Fill(this.table2DataSet.Ca tegorytable);
this.table3TableAdapter.Fill(this.table3DataSet.Ca tegorytable);
this.table4TableAdapter.Fill(this.table4DataSet.Ca tegorytable);


I tried replacing yhe word "Fill", with Delete, for the Delete Button ; and ClearBefore Fill for the AddNew Button.

For my save Button, I used :
this.Validate();
this.table1BindingSource1.EndEdit();
this.table2BindingSource.EndEdit();
this.table3BindingSource.EndEdit();
this.table4BindingSource.EndEdit();
this.tableAdapterManager.UpdateAll(this.DatabaseDa taSet);


Hope I'm on the right track... :-(
Sep 16 '09 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Alex Wisnoski | last post by:
Access 97SR2-I am trying to create a Job Position data entry form based on a table. The form has 15 fields on it. I want to use a combo box to look in the table and see if the position number...
4
by: meganrobertson22 | last post by:
Hi Everyone- I have a question about how to add and then use the "All" selection in a combo box. I am trying to figure out how to: (1) add "All" as a selection to a combo box and then (2)...
3
by: Frustrated Developer via DotNetMonster.com | last post by:
I have posted a couple times on here already and found the user community to be very helpful. I took on a project before I realized how difficult a time I'm having working with a database....
14
by: Kevin | last post by:
A couple of easy questions here hopefully. I've been working on two different database projects which make use of multiple forms. 1. Where's the best/recommended placement for command buttons...
2
by: kiranmn75 | last post by:
I want to dynamically populate a combo box through javascript. Data is coming from a array. Sometimes data list may contain items in excess of 2000. Explorer takes more than 5 seconds to...
2
by: AA Arens | last post by:
During my database construction, I left the names of the buttons, comboboxes named by default like Combo77, Command43. I can rename them with Properties Other Name, but them I start getting...
2
by: sara | last post by:
I think I don't understand combo boxes and forms - and all that I'm reading is just confusing me more. I am doing a "favor" for a non-profit organization. They take a phone call and need to...
0
by: dudeja.rajat | last post by:
On Sat, Aug 30, 2008 at 2:32 PM, Fredrik Lundh <fredrik@pythonware.comwrote: Fredrik, Thanks so much. That worked. Following this, I can now see that my combo2 has no previous elements and...
11
tdw
by: tdw | last post by:
Hi all, I have tried a few different methods to accomplish this, but with no luck. I will post the code for the latest attempt at the end of this post. I work at a land surveying company. This...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.